﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;
using System.Globalization;

namespace MvcApplication2.Models.DTO
{
    public class NguoiDung
    {
        public int Id { get; set; }

        [Required]
        [Display(Name="User name")]
        [StringLength(50)]
        public string Username { get; set; }

        public string Password { get; set; }

        [Required]
        [Display(Name = "Họ tên người dùng")]
        [StringLength(100)]
        public string TenNguoiDung { get; set; }

        [Required]
        [DataType(DataType.Date)]
        [Display(Name = "Ngày sinh")]
        public DateTime NgaySinh { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "Địa chỉ email không hợp lệ.")]
        [Display(Name = "Email")]
        [StringLength(50)]
        public string Email { get; set; }

        [Required]
        [Display(Name = "Địa chỉ")]
        [StringLength(150)]
        public string DiaChi { get; set; }

        [Display(Name = "Điện thoại")]
        [StringLength(15)]
        public string DienThoai { get; set; }

        public int? IDLoaiNguoiDung { get; set; }

        public int? DiemThuong { get; set; }

        public int? IDDaiLy { get; set; }
    }
}